package cn.web.web_module.rabbitmq.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: 张松
 * @Description:
 * @Date: Created in 18:52 2021/3/30
 * @Modified By:
 */
@Configuration
public class DirectRechargeInfoConfiguration {


    @Bean
    public DirectExchange directRechargeInfoExchange(){
        return new DirectExchange("direct_RechargeInfo_exchange",true,false);
    }

    @Bean
    public Queue directRechargeInfoQueue(){
        return new Queue("direct_RechargeInfo.queue",true);
    }

    @Bean
    public Binding directRechargeInfoBinding(){
        return BindingBuilder.bind(directRechargeInfoQueue()).to(directRechargeInfoExchange()).with("rechargeInfo");
    }

}
